1. Field of the Invention
The present invention relates to an MIDI-code generating device which generates an MIDI (Musical Instrument Digital Inter face) code for controlling the performance of the electronic instrument by extracting the volume and time interval between key depression and key release of each musical interval played on such instruments as a piano.
2. Prior Art
As for automatic performance pianos, there are ones having record and playback functions and others having playback functions only. For those which only have playback functions, it is possible to do automatic performance based on input MIDI-code, but the live (actual) tone played by the musician cannot be changed to MIDI-code and be stored. At this point, a device becomes necessary which generates MIDI-code performance by extracting the volume and time interval between key depression and key release of each musical interval, played on such instruments as a piano. As for such kind of devices in prior art, the live tone is transformed into an electric audio signal; then after this audio signal has been transformed into a digital signal, the power spectrum of each frequency corresponding to a musical interval is computed. Based on the power spectrum, successively calculated on each musical interval, a device for generating an MIDI-code representing the time interval between key depression and key release of each musical interval and the volume is proposed.
On pianos and other musical instruments where a plurality of keys may be pressed at the same time and a polyphonic tone is produced, even simply requesting a power spectrum of each musical interval, as mentioned above, brings the desire of improvement, since the generated MIDI-code is different from the original performance. In other words, in a power spectrum calculated successively on each musical interval, the intervals of the keys actually depressed, that is, not only a power spectrum which suits to the fundamental tone, but also power spectra which suit to the harmonic tones (harmonic components), are mostly included. According to this, an MIDI-code of the interval corresponding to this harmonic tone is generated; though a key has not been depressed, an additional MIDI-code is generated, as if a key had been depressed.
Therefore a device is proposed which refers to a ratio-table storing the ratio of the level of the fundamental tone to the level of the harmonic tone and decides the fundamental tone and the harmonic tone. However, in case of depressing several keys at the same time, the fundamental tones cannot be decided with certainty. Also, there is the problem that the fundamental tones which relates to a plurality of frequencies has to be decided at the same time, and the problem of time necessary for processing.